#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :config.py
# @Time      :2021/6/20 19:06
# @Author    : 刘广鸿


from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware

# 创建一个FastAPI 应用对象
shzx_app = FastAPI()


# 可跨域访问的域名
origins = [
    "*"
]

# 可跨域访问的基本请求设置
shzx_app.add_middleware(
    CORSMiddleware,
    allow_origins=origins,
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)
